package com.qing.cmsservice.controller;

import com.qing.cmsservice.entity.pojo.CrmBanner;
import com.qing.cmsservice.service.CrmBannerService;
import com.qing.servicebase.utils.ResponseResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName Yjx
 * @Description TODO
 * @date 2022/9/14 15:20
 * @Version 1.0
 */
@RestController
@RequestMapping("/cmsservice/api/banner")
@CrossOrigin
public class BannerApiController {

    private final CrmBannerService bannerService;

    public BannerApiController(CrmBannerService bannerService) {
        this.bannerService = bannerService;
    }

    @GetMapping("/getAllBanner")
    public ResponseResult index() {
        return bannerService.selectIndexList();
    }

}
